﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Cms.Domain;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Cms.Tests.Unit.Domain
{

    [TestClass]
    public class MenuItemTranslationTests
    {

        #region Additional test attributes
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        // Use TestInitialize to run code before running each test 
        // [TestInitialize()]
        // public void MyTestInitialize() { }
        //
        // Use TestCleanup to run code after each test has run
        // [TestCleanup()]
        // public void MyTestCleanup() { }
        //
        #endregion

        [TestMethod]
        public void Clone_Success()
        {
            MenuItemTranslation original = new MenuItemTranslation()
                                                  {
                                                      Name = "Start",
                                                      Url = "default.aspx",
                                                      DefaultImage = new MediaFile {ID = 1},
                                                      ActiveImage = new MediaFile {ID = 2},
                                                      DefaultHoverImage = new MediaFile {ID = 3},
                                                      ActiveHoverImage = new MediaFile {ID = 4}
                                                  };
            MenuItemTranslation clone = (MenuItemTranslation)original.Clone();
            Assert.AreEqual(original.Name, clone.Name);
            Assert.AreEqual(original.Url, clone.Url);
            Assert.AreSame(original.DefaultImage, clone.DefaultImage);
            Assert.AreSame(original.ActiveImage, clone.ActiveImage);
            Assert.AreSame(original.DefaultHoverImage, clone.DefaultHoverImage);
            Assert.AreSame(original.ActiveHoverImage, clone.ActiveHoverImage);
        }

    }

}
